<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    
    const m = new Map();

    m.set("name", "admin");
    m.set("age", 18);
    m.set("sex", "男");

    console.log(m);
    console.log(typeof m);

    console.log(m.get("name"));
    console.log(m.get("sex"));
    console.log(m.get("age"));

    console.log(m.size);

    console.log(m.keys());
    console.log(m.values());
    console.log(m.entries());

    m.forEach((val, idx, self)=>{
        console.log(val, idx, self)
    })

    for(let i of m){
        console.log(i);
    }

    for(let i of m.keys()){
        console.log(i);
    }

    for(let i of m.values()){
        console.log(i);
    }

</script>
</html>